/*
 * Copyright (c) 2006-2020, RT-Thread Development Team
 *
 * SPDX-License-Identifier: Apache-2.0
 *
 * Change Logs:
 * Date           Author       Notes
 * 2020-05-21     chenhy       the first version
 */
#ifndef APPLICATIONS_MEM_H_
#define APPLICATIONS_MEM_H_
#include <stdint.h>
#include "flash_map.h"
int32_t flash_erase_pages(uint32_t page_address, uint32_t num_pages);
int32_t flash_erase(uint32_t page_address);
int32_t flash_write(uint32_t address, void* pbuf, int32_t size);
int32_t flash_read(uint32_t address, void* pbuf, int32_t size);

#include "fram_map.h"
int32_t fram_write(uint16_t reg, void* pbuf, int32_t size);
int32_t fram_read(uint16_t reg, void* pbuf, int32_t size);

#include "ram_map.h"
int32_t ram_write(uint32_t address, void* pbuf, int32_t size);
int32_t ram_read(uint32_t address, void* pbuf, int32_t size);

#endif /* APPLICATIONS_MEM_H_ */
